﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using YouHP.Model;

namespace YouHP.IDAL
{
    public interface ITreatment
    {
        #region 治疗增删改查基本操作
        bool AddTreatment(TreatmentInfo info);
        bool UpdateTreatment(TreatmentInfo info);
        bool DeleteTreatment(int[] itemid);
        TreatmentInfo GetTreatmentInfo(int id);
        #endregion

        #region 治疗列表以及搜索操作
        /*按条件检索治疗列表*/
        List<TreatmentInfo> GetTreatmentList(int pageSize, int pageIndex, string condStr, out int count);
        List<TreatmentInfo> GetTreatmentListWithOrder(int pageSize, int pageIndex, string condStr, string sOrder, out int count);

        /*按疾病条件检索治疗列表*/
        List<TreatmentInfo> GetTreatmentListByDisease(int pageSize, int pageIndex, string condStr, out int count);

        /*按条件检索治疗列表（包括典型病人信息）*/
        List<TreatmentInfo> GetTreatmentListWithPatientInfo(int pageSize, int pageIndex, string condStr, out int count);

        /*按疾病条件检索治疗列表（包括典型病人信息）*/
        List<TreatmentInfo> GetTreatmentListByDiseaseWithPatientInfo(int pageSize, int pageIndex, string condStr, out int count);

        /*按照治疗名称来检索治疗*/
        List<TreatmentInfo> GetTreatmentByName(int pageSize, int pageIndex, string keyword, out int count);

        /*按照治疗名称拼音字母来检索治疗*/
        List<TreatmentInfo> GetTreatmentByPinYin(int pageSize, int pageIndex, string pinYin, out int count);

        /*按照治疗类型来检索治疗*/
        List<TreatmentInfo> GetTreatmentByType(int pageSize, int pageIndex, int treatmentTypeId, out int count);

        List<TreatmentInfo> GetTreatmentListOrderByDiseaseId(int iDiseaseId, int pageSize, int pageIndex, out int count);
        #endregion

        #region 治疗类型基本操作
        bool AddTreatmentType(TreatmentTypeInfo info);
        bool UpdateTreatmentType(TreatmentTypeInfo info);
        bool DelTreatmentType(int[] itemIds);
        #endregion

        #region 治疗类型列表以及搜索操作
        TreatmentTypeInfo GetTreatmentTypeInfo(int id);
        List<TreatmentTypeInfo> GetTreatmentTypeList();
        List<TreatmentTypeInfo> GetTreatmentTypeList(int parentId);
        #endregion

        #region 治疗统计
        List<TreatmentStatDosage> GetTreatmentStatDosage(int tid);
        List<TreatmentStatTaketime> GetTreatmentStatTaketime(int tid);
        #endregion
    }
}
